import http from "../utils/request";
//请求首页数据
export const getData=()=>{
    //返回一个promise对象
    return http.get("/home/getData")
}
export const getGithubData=()=>{
    //返回一个promise对象
    return http.get("https://api.github.com/search/users?q=user")
}
export const getUser=(params)=>{
    console.log(params)
    //返回一个promise对象
    return http.get("/user/getUser",params)
}
export const addUser=(data)=>{
    //返回一个promise对象
    return http.post("/user/add",data)
}
export const editUser=(data)=>{
    //返回一个promise对象
    return http.post("/user/edit",data)
}
export const delUser=(data)=>{
    //返回一个promise对象
    return http.post("/user/del",data)
}
